<?php 
/**
 * Parameters
 * @param OrganizationalUnit 	$organizational_unit 			Current Organizational Unit
 * @param Doctrine_Collection 	$members 						Collection of members assigned to the current organizational unit
 * @param integer				$period
 */
?>
<?php slot('heading', $organizational_unit->getName());?>
<?php slot('current_nav_tab', 'member');?>

		<div class="x8">
				
			<?php //include_partial('member/list', array('members' => $members, 'organizational_unit' => $organizational_unit, 'checkboxes' => false));?>
			<table class="data display datatable" id="example">
				<thead>
					<tr>
						<th>Name</th>
						<th>Vorname(n)</th>
						<th>Datum</th>
						<th>Optionen</th>
					</tr>
				</thead>
				<tbody>
				<?php if(count($members) > 0):?>
				<?php foreach($members as $i => $member):?>
    				<tr>
    					<td><?php echo $member->getLastName();?></td>
    					<td><?php echo $member->getFirstName();?></td>
    					<td><?php echo $member->getDeletedAt();?></td>
    					<td>
    						<a href="<?php echo url_for('member_restore', array('sf_subject' => $member, 'unit' => $organizational_unit))?>">Wiederherstellen</a>
    					</td>
    				</tr>
				<?php endforeach;?>
				<?php else:?>
					<tr>
						<td colspan="8"><i>Keine Mitglieder gefunden.</i></td>
					</tr>
				<?php endif;?>
				</tbody>
			</table>
		
		</div>
		
		<div class="x4">
			<h2 class="box">Werkzeugbox<img alt="Werkzeugbox" src="<?php echo image_path('icons/content_werkzeugbox.png')?>" /></h2>
			<table class="box_table subnavigation">
				<tbody>
					<tr>
						<td><a href="#">Du sieht die gelöschten Mitglieder der letzten <?php echo $period;?> Tage.</a></td>
					</tr>
					<tr>
						<td><a href="<?php echo url_for('organizational_unit_portal', $organizational_unit);?>"><img alt="Zurück" src="<?php echo image_path('icons/content_subnavigation_plus.png')?>" />Zurück</a></td>
					</tr>
				</tbody>
			</table>
		</div>